package com.springboot.demo.config.mongo;

import com.springboot.mongo.annotation.MongoEnable;
import com.springboot.mongo.dao.UserLoginDAO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.mongodb.core.MongoTemplate;

/**
 * mongo dao 配置
 *
 * @author supu
 * @date 2019-08-26 15:08
 **/
@Configuration
@MongoEnable
public class MongoDAOConfiguration {
    @Autowired
    private MongoTemplate mongoTemplate;

    @Bean
    public UserLoginDAO userLoginDAO() {
        return new UserLoginDAO(mongoTemplate);
    }
}
